﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using cludg.Domain.Users;
using cludg.Domain.Content.Stories;

namespace cludg.Web.RateContentModule.Domain
{
	public class RateHistory
	{
		public virtual string Id { get; protected set; }
		public virtual string UserId { get; protected set; }
		public virtual string StoryId { get; protected set; }
		public virtual Story Story { get; protected set; }
		public virtual int Rate { get; protected set; }

		protected RateHistory()
		{			
		}

		public RateHistory(User user, Story story, int rate)
			: this()
		{
			UserId = user.Id;
			StoryId = story.Id;
			Rate = rate;
		}

		public void Rerate(int newRate)
		{
			Rate = newRate;
		}
	}
}